chore: Introduce visualAccent prop to box#4679
Draft
at-susie wants to merge 21 commits into
Draft
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4679 +/- ##
=======================================
Coverage 97.57% 97.57%
=======================================
Files 948 948
Lines 30517 30530 +13
Branches 11168 11178 +10
=======================================
+ Hits 29777 29790 +13
- Misses 693 733 +40
+ Partials 47 7 -40 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
d9ccc2b to
0f8d417
Compare
- Remove redundant `color: inherit` from `.awsui-accent-base` base class - Increase specificity of accent color selectors from `.accent-*` to `.box.accent-*` (0,1,0 to 0,2,0) to ensure accent text colors override root default-text-style - Add `color: inherit` to nested Box elements within accented containers to properly propagate parent accent color - Remove explicit `variant="subtle"` from Icon in accent context to use inherited styling - Remove unnecessary `color="inherit"` from Icon wrapper in table rows as specificity fix handles propagation - Update SCSS documentation to clarify specificity strategy and color inheritance behavior - Ensures accent content text colors take precedence and cascade correctly to descendants
- Replace `variant="awsui-accent"` and `accentColor` props with new `visualAccent` prop object - Add `boxVisualAccentBorderRadius` custom CSS property to design tokens - Update Box interfaces to support `visualAccent` with color, aspectRatio, and borderRadius options - Simplify accent box implementation in Box component internal styles - Replace `accentShape` prop with `aspectRatio` and `borderRadius` in visualAccent object
c0f12e9 to
c48bed2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces a new property
visualAccentprop to the box component. The new prop allows builders to visually emphasize specific elements through a curated set of background and content color combinations.Related links, issue #, if available: n/a
How has this been tested?
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.